<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
<html xmlns:jsp="http://java.sun.com/JSP/Page">

<spring:url value="/upload" var="upload"/>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Book upload</title>
</head>
<body>
<jsp:include page="header.jsp" />
<div id="centered">
 <div class = "forms">
        	<form:form action="${upload}" method="POST"
		modelAttribute="book" enctype="multipart/form-data">
		

	Title: <form:input path="title" value="${book.title}" />
	
		<form:errors path="title" cssClass="errorLogin" element="div"/>
		<br>
		
		<br/>
	Pages number: <form:input path="pages" value="${book.pages}" />

	<form:errors path="pages" cssClass="errorLogin" element="div"/>
		<br>
		
		<br/>
	Date of publication: <form:input path="pubDate"  />

	<form:errors path="pubDate" cssClass="errorLogin" element="div"/>
		<br>
		
		<br/>
		
		ISBN: <form:input path="isbn" value="${book.isbn}" />

	<form:errors path="isbn" cssClass="errorLogin" element="div"/>
   <br/>
   <input type="file" name="file" id="file"></input>   

		<form:button>Upload</form:button>

	</form:form>
        </div>
        </div>

</body>
</html>